{% extends 'base.html' %}
{% load staticfiles %}

{% block title %}workrecord{% endblock %}

{% block content %}
    <form id="formwork">

        <div class="plugin3_demo" id="plugin3_demo2"
             style="display:inline-block;margin-top: 30px;margin-bottom:20px;margin-right:20px;float: left;">
            <!-- select2 通过javascript start -->
            <label>所属商场:</label> <select id="shopselect" style="width:200px;">
            {% for shop in shops %}
                <option value="{{ shop.shopname }}">{{ shop.shopname }}</option>
            {% endfor %}
        </select>
            <!-- select2 通过javascript end -->
        </div>
        <div class="plugin3_demo" id="plugin3_demo2"
             style="display:inline-block;margin-top: 30px;margin-bottom:20px;margin-right:20px;float: left;">
            <!-- select2 通过javascript start -->
            <label>报障系统:</label><select id="systemselect" style="width:200px;">
            <option value=""></option>

            {% for system in systems %}
                <option value="{{ system.systemname }}">{{ system.systemname }}</option>
            {% endfor %}
        </select>
            <!-- select2 通过javascript end -->
        </div>
        <div class="plugin3_demo" id="plugin3_demo2"
             style="display:inline-block;margin-top: 30px;margin-bottom:20px;margin-right:20px;float: left;">
            <!-- select2 通过javascript start -->
            <label>报障类别:</label><select id="errorselect" style="width:200px;">

        </select>
            <!-- select2 通过javascript end -->
        </div>


        <div class="plugin3_demo" id="plugin3_demo2"
             style="display:inline-block;margin-top: 30px;margin-bottom:20px;margin-right:20px;float: left;">
            <button id="insertselect">插入</button>
        </div>
    </form>

    <div class="king-block-content">
        <!-- 带搜索表格(DataTables)-1 Start -->
        <div id="refreshtable">

            <table class="table table-out-bordered table-bordered table-header-bg table-hover" id="recordtable">


                <thead>
                <tr>
                    <th>ID</th>
                    <th>商场名</th>
                    <th>报障系统</th>
                    <th>报障类别</th>
                    <th>处理人</th>
                    <th>处理时间</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                {% for record in records %}
                    <tr>
                        <td>{{ record.id }}</td>
                        <td>{{ record.shopname }}</td>
                        <td>{{ record.systemname }}</td>
                        <td>{{ record.errortype }}</td>
                        <td>{{ record.worker }}</td>
                        <td>{{ record.flowtime }}</td>

                        <td>
                            <button class="delete">删除</button>
                        </td>
                    </tr>

                {% endfor %}
                </tbody>

            </table>

        </div>
        <!-- 带搜索表格(DataTables)-1 End -->
    </div>
{% endblock %}
{% block scripts %}
    <script src="{% static 'js/jquery.dataTables.js' %}" type="text/javascript"></script>
    <script src="{% static 'js/dataTables.bootstrap.js' %}" type="text/javascript"></script>
    <script src="//cdn.bootcss.com/jquery-cookie/1.4.1/jquery.cookie.min.js" type="text/javascript"></script>

    <script src="{% static 'js/dialog-min.js' %}"></script>
     <script src="{% static 'js/workrecord.js' %}"></script>

{% endblock %}
